﻿using System;
using System.Collections;
using System.Collections.Generic;
using Data;
using UnityEngine;
using UnityEngine.UI;

public class LoginPanel : MonoBehaviour {

    public InputField userName;
    public InputField nickName;
    public Button loginBth;

    void Start()
    {
        loginBth.onClick.AddListener(OnLoginClick);
    }
    private void OnLoginClick()
    {
        ReqLogin req = new ReqLogin();
        req.username = userName.text;
        req.nickname = nickName.text;

        NetworkManager.Instance.Send(Protocal.Login_CMD,ProtoHelper.Serialize(req));
    }
}
